<?php
// +----------------------------------------------------------------------
// | YBlog
// +----------------------------------------------------------------------
// | Copyright (c) 2008 http://www.yhustc.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: yhustc <yhustc@gmail.com>
// +----------------------------------------------------------------------
// $Id$

/**
 +------------------------------------------------------------------------------
 * YBlog后台管理首页模块
 +------------------------------------------------------------------------------
 * @author    yhustc <yhustc@gmail.com>
 * @version   $Id$
 +------------------------------------------------------------------------------
 */


class IndexAction extends BaseAction
{
	/**
     +----------------------------------------------------------
     * 后台管理首页
     +----------------------------------------------------------
     * @access public 
     +----------------------------------------------------------
     */
    public function index()
	{
		//服务器相关信息
		$info["phpver"] = PHP_VERSION;
		$info["mysqlver"] = mysql_get_server_info();
		$info["server_env"] = get_cfg_var("register_globals")=="1" ? "ON" : "OFF";
		$info["server_tout"] = get_cfg_var("max_execution_time");
		
		//最新的5条评论
		$Dao = D("Comments");
		$commentList = $Dao->order("comment_date DESC")->top5();
	
		$this->assign("info",$info);
		$this->assign("commentList",$commentList);
        $this->assign("pageFile","Index:index");
		$this->layout();
    }
}
?>